package cate.game.role.res.guild.boss;

import cate.game.role.res.guild.po.GuildPO;
import cate.game.role.res.guild.po.GuildFuncDependent;
import cate.game.role.Role;

public interface GuildFuncImpl {

    default GuildFuncDependent createFuncDependent(GuildPO guild, Role role) {
        return GuildFuncDependent.of(guild, role, getFuncId());
    }

    GuildFuncDependent getFuncDependent();

    /**
     * 公会子功能判断是否开启
     * 
     * @return
     */
    default boolean guildFuncOpenCheck() {
        return getFuncDependent().checkOpen();
    }

    default boolean guildFuncOpenCheck(Role role) {
        return getFuncDependent(role).checkOpen();
    }

    default GuildFuncDependent getFuncDependent(Role role){
        return getFuncDependent().setRole(role);
    }

    int getFuncId();
}
